<input id="file-selector" type="file">
<script src="dist/cos-js-sdk-v5.min.js"></script>
	<script>
		var Bucket = 'pilipili-1259675676';
var Region = 'ap-shanghai';     /* 存储桶所在地域，必须字段 */

var cos = new COS({
		       SecretId: 'AKIDShh5FAjHVVIm48tUnwrXyDEzUk3BliAO',
		       SecretKey: 'KMAj37we8NN9h04tYy95mJfmeNs7C8pG',
	   });
cos.putObject({
	    Bucket: 'pilipili-1259675676', /* 必须 */
	        Region: 'ap-shanghai',     /* 存储桶所在地域，必须字段 */
		    Key: 'KMAj37we8NN9h04tYy95mJfmeNs7C8pG',              /* 必须 */
		        StorageClass: 'STANDARD',
			    Body: fileObject, // 上传文件对象
			        onProgress: function(progressData) {
				        console.log(JSON.stringify(progressData));
					    }
					    }, function(err, data) {
					        console.log(err || data);
						});

	</script>
